<!--
 * new page
 * @author: eminem89
 * @since: 2023-12-24
 * Person.vue
-->
<template>
    <div class="person">
        <h2>当前求和为:{{ sum }},放大10倍后:{{ bigSum }}</h2>
        <button @click="add">点我sum+1</button>
        <br />
        <img v-for="(dog, index) in dogList" :src="dog" :key="index" />
        <br />
        <button @click="getDog">再来一只小狗</button>
    </div>
</template>

<script lang="ts" setup name="Person">
import useDog from '@/hooks/useDog';
import useSum from '@/hooks/useSum';

const { dogList, getDog } = useDog();
const { sum, add, bigSum } = useSum();
</script>

<style scoped>
.person {
    background-color: skyblue;
    box-shadow: 0 0 10px;
    border-radius: 10px;
    padding: 20px;
}

button {
    margin: 0 5px;
}
img {
    height: 400px;
    margin-left: 10px;
}
</style>
